﻿@model IEnumerable<DotaStrategy.Models.Heroe>


@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th></th>
        <th>
            Name
        </th>
        <th>
            Level
        </th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
            @Html.ActionLink("Details", "Details", new { id = item.Id }) |
            @Ajax.ActionLink("Delete", "Delete", "Heroes", new { id = item.Id }, new AjaxOptions { HttpMethod = "POST", Confirm = "Are you.. you?" }, new { })
        </td>
        <td>
            @item.Name
        </td>
        <td>
            @item.Level
        </td>
    </tr>
}

</table>

